/**
 * Vue 应用入口文件
 * 用于在 Astro 中全局配置 Vue 和 Element Plus
 */
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

export default (app) => {
  // 注册 Element Plus
  app.use(ElementPlus, {
    locale: zhCn,
  })
  
  // 注册所有图标
  for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
  }
}
